:root {
  --primary-color: #1a8c4c;     /* Darker emerald green */
  --accent-color: #e67e00;      /* Darker warm orange */
  --text-light: #ffffff;
  --text-accent: #c8e6c9;       /* Darker mint */
  --hover-color: #146c3a;       /* Even darker green */
  --shadow-color: rgba(26, 140, 76, 0.4);
  --gradient-start: rgba(0, 0, 0, 0.85);
  --gradient-end: rgba(26, 140, 76, 0.2);
}

html {
  overflow-y: scroll;
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Background styling */
body {
  background-image: linear-gradient(to top, var(--gradient-start), var(--gradient-end)), url('Web Images/contact us.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  font-family: 'Arial', sans-serif;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar container */
.nav-wrapper {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: transparent;
  transition: all 0.3s ease;
}

.nav-wrapper:hover {
  background-color: rgba(0, 0, 0, 0.95);
}

/* Navbar layout using Flexbox */
.navbar {
  max-width: 1500px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Logo styling */
.logo {
  width: 100px;
  height: 100px;
  min-width: 100px;
  object-fit: cover;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 15px var(--shadow-color);
}

.logo:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--shadow-color);
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin-left: auto;
  padding: 0;
}

.nav-links li {
  white-space: nowrap;
}

.nav-links li a {
  position: relative;
  display: inline-block;
  color: var(--text-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  padding: 10px 20px;
  border: 3px solid var(--primary-color);
  border-radius: 25px;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  height: 100%;
  width: 100%;
  background-color: var(--primary-color);
  z-index: -1;
  transition: all 0.3s ease;
  border-radius: 25px;
}

.nav-links li a:hover::before {
  left: 0;
}

.nav-links li a:hover {
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Image popup overlay */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  cursor: pointer;
}

/* Remove blue outline when image is clicked */
.logo:focus,
.logo:active,
.logo:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.SBPI {
  font-size: 48px;
  font-weight: bold;
  margin-left: 20px;
  color: var(--accent-color);
  white-space: nowrap;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.nav-wrapper h1 span {
  display: inline-block;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.nav-wrapper h1 span:hover {
  transform: scale(1.2) rotate(5deg);
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--shadow-color);
}

/* Contact Container Styles */
.contact-container {
  max-width: 1200px;
  margin: 200px auto 50px;
  padding: 20px;
  position: relative;
  animation: fadeIn 1s ease-out;
}

.page-title {
  text-align: center;
  color: var(--text-light);
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contact Cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-color);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.contact-card:hover .card-icon {
  background: var(--accent-color);
  transform: scale(1.1);
}

.contact-card h3 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.contact-card p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin: 5px 0;
  opacity: 0.9;
}

/* Map and Form Container */
.map-and-form {
  max-width: 1200px;
  margin: 0 auto;
}

.form-heading {
  color: var(--text-light);
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.form-heading span {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  padding: 10px 30px;
  border-radius: 50px;
  margin: 0 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 5px 25px var(--shadow-color);
  }
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.map-container {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: fit-content;
}

.map {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-container {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form {
  padding: 20px;
  border-radius: 10px;
}

/* Contact Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--text-light);
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.form-group .required {
  color: #ff4444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(230, 126, 0, 0.3);
}

.submit-btn {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.submit-btn:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(230, 126, 0, 0.3);
}

/* Footer Styles */
.footer {
  background-color: rgba(0, 0, 0, 0.85);
  padding: 30px 0;
  text-align: center;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 50px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0 0 20px 0;
  padding: 0;
  list-style: none;
}

.social-icons a {
  color: var(--text-light);
  font-size: 24px;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--primary-color);
  transform: translateY(-5px);
}

.copyright {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
  padding: 0;
  opacity: 0.8;
}

.copyright span {
  color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-wrapper {
    background-color: transparent;
    transition: background-color 0.3s;
  }
  .nav-wrapper:hover,
  .nav-wrapper:active,
  .nav-wrapper:focus-within {
    background-color: #111;
  }
  .navbar {
    padding: 12px 0 0 0;
  }
  .contact-container {
    margin-top: 70px !important;
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .contact-cards, .content-wrapper, .map-container, .form-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .logo {
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin-bottom: 5px;
  }
  .SBPI {
    font-size: 22px;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 12px;
    line-height: 1.3;
  }
  .nav-links {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
    padding: 0 10px;
  }
  .nav-links li {
    flex: 1;
    max-width: 105px;
  }
  .nav-links li a {
    font-size: 14px;
    padding: 8px 12px;
    width: 100%;
    display: block;
    text-align: center;
    box-sizing: border-box;
    border-width: 2px;
  }
  .page-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 0;
  }
  .contact-card {
    padding: 25px 15px;
  }
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin-bottom: 15px;
  }
  .contact-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }
  .contact-card p {
    font-size: 14px;
    line-height: 1.5;
  }
  .content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0;
  }
  .map-container,
  .form-container {
    width: 100%;
    padding: 20px 15px;
  }
  .map {
    height: 300px;
  }
  .form-heading {
    font-size: 20px;
    margin-bottom: 20px;
  }
  .contact-form {
    padding: 5px 10px 15px;
  }
  .form-group {
    margin-bottom: 15px;
  }
  .form-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .form-group input,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
  }
  .submit-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
  .footer {
    padding: 25px 15px;
    margin-top: 40px;
  }
  .social-icons {
    gap: 25px;
    margin-bottom: 20px;
  }
  .social-icons a {
    font-size: 24px;
  }
  .copyright {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 20px;
  }
}

@media screen and (max-width: 480px) {
  .nav-wrapper {
    background-color: transparent;
  }
  .nav-wrapper:hover,
  .nav-wrapper:active,
  .nav-wrapper:focus-within {
    background-color: #111;
  }
  .navbar {
    padding: 10px 0 0 0;
  }
  .contact-container {
    margin-top: 60px !important;
    padding-left: 4vw !important;
    padding-right: 4vw !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .contact-cards, .content-wrapper, .map-container, .form-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .logo {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }
  .SBPI {
    font-size: 20px;
    padding: 0 8px;
  }
  .nav-links {
    gap: 8px;
    padding: 0 8px;
  }
  .nav-links li {
    max-width: 95px;
  }
  .nav-links li a {
    font-size: 13px;
    padding: 6px 10px;
  }
  .page-title {
    font-size: 22px;
    margin-bottom: 25px;
  }
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
  }
  .contact-card {
    padding: 20px 12px;
  }
  .card-icon {
    width: 45px;
    height: 45px;
    font-size: 18px;
    margin-bottom: 12px;
  }
  .contact-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
  }
  .contact-card p {
    font-size: 13px;
    line-height: 1.4;
  }
  .map-container,
  .form-container {
    padding: 15px 12px;
  }
  .map {
    height: 250px;
  }
  .form-heading {
    font-size: 18px;
    margin-bottom: 15px;
  }
  .contact-form {
    padding: 5px 8px 12px;
  }
  .form-group {
    margin-bottom: 12px;
  }
  .form-group label {
    font-size: 13px;
    margin-bottom: 5px;
  }
  .form-group input,
  .form-group textarea {
    padding: 8px;
    font-size: 13px;
  }
  .submit-btn {
    padding: 10px 18px;
    font-size: 14px;
  }
  .footer {
    padding: 20px 10px;
  }
  .social-icons {
    gap: 20px;
    margin-bottom: 15px;
  }
  .social-icons a {
    font-size: 20px;
  }
  .copyright {
    font-size: 12px;
    padding: 0 10px;
    line-height: 1.4;
  }
}

/* Touch device optimizations */
@media (hover: hover) {
  .nav-links li a:hover {
    transform: translateY(-2px);
  }
  .logo:hover {
    transform: scale(1.05);
  }
  .nav-wrapper h1 span:hover {
    transform: scale(1.1);
    color: var(--primary-color);
  }
  .contact-card:hover {
    transform: translateY(-5px);
  }
  .submit-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
  }
}

@media (hover: none) {
  .nav-links li a:active {
    transform: translateY(1px);
    background-color: var(--primary-color);
  }
  .logo:active {
    transform: scale(0.98);
  }
  .nav-wrapper h1 span:active {
    color: var(--primary-color);
  }
  .contact-card:active {
    transform: translateY(2px);
  }
  .submit-btn:active {
    transform: translateY(1px);
  }
}

/* Landscape mode */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    gap: 8px;
  }
  .logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .SBPI {
    font-size: 18px;
    margin-left: 8px;
    padding: 0 6px;
  }
  .nav-links {
    width: auto;
    margin: 0;
    padding: 0 6px;
  }
  .nav-links li a {
    padding: 5px 8px;
    font-size: 13px;
  }
  .contact-container {
    margin: 120px auto 20px;
  }
  .map {
    height: 180px;
  }
  .form-group textarea {
    height: 80px;
  }
  .content-wrapper {
    gap: 20px;
  }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Form Message Styles */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #fff;
}

.form-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #fff;
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--gradient-start);
  padding: 80px 20px 20px;
  z-index: 999;
  backdrop-filter: blur(10px);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu ul li {
  margin: 15px 0;
  text-align: center;
}

.mobile-menu ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding: 12px;
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu ul li a:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Update hamburger styles */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1000;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent-color);
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media screen and (max-width: 900px) {
  .nav-links {
    display: none !important;
  }
  .hamburger {
    display: block !important;
  }
  
  /* Hide title completely in mobile */
  .SBPI {
    display: none !important;
  }
  
  /* Adjust logo and navbar for removed title */
  .logo {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    margin: 0 !important;
  }
  
  .navbar {
    padding: 10px 15px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .contact-container {
    margin-top: 120px !important;
  }
  
  .map-and-form {
    margin-top: 30px;
  }
}

@media screen and (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}